<template>
	<div class="basicQiye"> 
		<!-- 企业信息照片 -->
		<div class="basicQiye_img">
			<img src="../../../public/images/enterprise/qyxx@2x.png" >
		</div>
		<div class="basicQiye_form">
			<!-- 表格对应的4个圆点 -->
			<div class="lineRadius l1"></div>
			<div class="lineRadius l2"></div>
			<div class="lineRadius r1"></div>
			<div class="lineRadius r2"></div>
			<!-- 企业信息表格 -->
			<table class="ntable" border="1">
				<tr>
					<td width="18%" class="tb">统一社会信用代码 </td>
					<td colspan="" class="copy-hover-item">{{baseData.tyshxydm|datum}}</td>
					<td width="13%" class="tb">法定代表人</td>
					<td width="20%" class="copy-hover-item">{{baseData.fddbr|datum}}</td>
					<td width="13%" class="tb1">登记状态</td>
					<td width="20%">{{baseData.djzt|datum}}</td>
				</tr>
				<tr>
					<!-- <td width="13%" class="tb1">曾用名</td>
					<td class="base-opertd">{{baseData.company_name}}</td> -->
					
					<td width="13%" class="tb1">登记机关</td>
					<td width="20%">{{baseData.register_org|datum}}</td>
					<td class="tb">成立日期</td>
					<td>{{baseData.clrq|datum}}</td>
					<td class="tb">注册资本</td>
					<td>{{baseData.zczb|datum}}</td>
				</tr>
				<tr>
					<td class="tb1">核准日期</td>
					<td class="copy-hover-item">{{baseData.hzrq|datum}}</td>
					<td class="tb1">营业期限</td>
					<td class="copy-hover-item">{{baseData.yyqx|datum}}</td>
					<td class="tb1">人员规模 </td>
					<td class="copy-hover-item">{{baseData.qygm|datum}}人</td>
				</tr>
				<tr>
					<td class="tb">注册地址</td>
					<td colspan="5" class="copy-hover-item">{{baseData.qydz|datum}}</td>
				</tr>
				<!---->
				<tr>
					<td class="tb1">经营范围</td>
					<td colspan="5" style="-webkit-line-clamp: 2;overflow: hidden;">{{baseData.jyfw|datum}}</td>
				</tr>
			</table>
		</div>
	</div>
</template>

<script>
import  {SM4}  from 'gm-crypto'
	export default{
		data() { 
			return{
				sbcompany:'',
				baseData:{}
			}
		},
		mounted() {
			this.getBasedata()
			
		},
		filters:{
			dateParse(dataString){
				/* 过滤器 */
			    if (dataString) {
			        let date = new Date(dataString);
			        let Y = date.getFullYear() + '-';
			        let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
			        let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
			        return Y + M + D ;
			    } else {
			        return '';
			    }
			},
			datum(value) {
			      if(value){
					  return value
				  }else{
					  return '--'
				  }
			    },
		},
		methods:{ 
			// 获取企业信息数据
			async getBasedata(){
				this.bCompany=this.$route.query.cid
				var dt = {
					"randomNum": '0123456789abcdeffedcba9876543210',
    			"id": this.bCompany
				};
				const aaa = await this.$api.post('/api/v1/cockpit/cockpitInterface?methodname=getCompanyById', dt)
				const bbb = SM4.decrypt(aaa.data, '0123456789abcdeffedcba9876543210', {
					inputEncoding: 'base64',
					outputEncoding: 'utf8'
				})
				this.baseData = JSON.parse(bbb).qyxx
			},
		}
	}
</script>

<style lang="stylus" rel='stylesheet/stylus' scoped>
	@import "~@/assets/basicQiye.styl"
</style>
